package adapt;

public class Client {

    public static void main(String[] args) {

        System.out.println("手机充电，由220伏转为5伏");
        Phone phone = new Phone();
        phone.charge(new VoltageAdapter(new Voltage220V()));

        System.out.println();

        System.out.println("音响充电，由440伏转为10伏");
        Sound sound = new Sound();
        sound.charge(new VoltageAdapter(new Voltage440V()));

    }


}
